package com.yaoli.pinduoduo;

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        int array [] = new int[num];
        for(int i = 0 ; i < num ; i++){
            array[i] = in.nextInt();
        }

        Comparator<Integer> findmax = new Comparator<Integer>(){
            public int compare(Integer o1,Integer o2){
                return o2 - o1;
            }
        };

        Comparator<Integer> findmin = new Comparator<Integer>(){
            public int compare(Integer o1, Integer o2){
                return o1 - o2;
            }
        };

        PriorityQueue<Integer> quzmax = new PriorityQueue<Integer>(10,findmax);
        PriorityQueue<Integer> quzmin = new PriorityQueue<Integer>(10,findmin);

        PriorityQueue<Integer> qufmax = new PriorityQueue<Integer>(10,findmax);
        PriorityQueue<Integer> qufmin = new PriorityQueue<Integer>(10,findmin);


        for(int i = 0 ; i < num ; i++){
            if(array[i] < 0){
                qufmax.offer(array[i]);
                qufmin.offer(array[i]);
            }else if(array[i] > 0){
                quzmax.offer(array[i]);
                quzmin.offer(array[i]);
            }
        }

        boolean zero = false;

        int max = Integer.MIN_VALUE;


    }
}
